﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using Tong;
public partial class 数据访问控件_使用dataview : System.Web.UI.Page
{
    TongUse TextData = new TongUse();
    Linq查询DataContext Db = new Linq查询DataContext();
    protected void Page_Load(object sender, EventArgs e)
    {

        DataView Dv = TextData.OleDbDataSet("select top 50 * from [News]").Tables[0].DefaultView;
        Dv.Sort = "id";
        GridView1.DataSource = Dv;
        GridView1.DataBind();

    }
}
